package com.coocaa.app.lib.cleaner.scanner.scannerother;

import android.content.Context;

import com.coocaa.app.lib.cleaner.scanner.scannerother.data.OtherData;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Eric on 2017/4/12.
 */

public class OtherUtils {

    private static final String DATA_PATH = "/data/data/";
    private Context mContext = null;
    private List<OtherWayScan> list = new ArrayList<OtherWayScan>();

    public OtherUtils(Context mContext) {
        this.mContext = mContext;
        initOtherWay(mContext);
    }

    private void initOtherWay(Context c) {
        list.add(new Other_UninstalledResave_Scan(c));
        //   list.add(new Other_Web_Scan(c));
    }

    public void stopScan() {
    }

    public OtherData getOtherData() {
        OtherData oD = new OtherData();
        for (OtherWayScan scan : list) {
            try {
                if (scan.getData() != null && scan.getData().list != null) {
                    oD.list.addAll(scan.getData().list);
                    oD.length += scan.getData().length;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return oD;
    }

}
